#define _CRT_SECURE_NO_WARNINGS 1

#include "List.h"

void Test001()
{
	ListNode* plist = InitList();
	ListPushBack(plist, 1);
	ListPushBack(plist, 2);
	ListPushBack(plist, 3);
	ListPushBack(plist, 4);
	ListPushBack(plist, 5);
	ListPushBack(plist, 6);
	ListPushBack(plist, 7);
	ListPushBack(plist, 8);
	ListPushBack(plist, 9);
	ListPrint(plist);

	ListPopBack(plist);
	ListPopBack(plist);
	ListPrint(plist);

	ListPushFront(plist, 44);
	ListPushFront(plist, 55);
	ListPrint(plist);

	ListPopFront(plist);
	ListPopFront(plist);
	ListPopFront(plist);
	ListPopFront(plist);
	ListPrint(plist);

	ListNode* find = ListFind(plist, 5);
	ListInsert(find, 77);
	ListPrint(plist);
	ListErase(find);
	ListPrint(plist);
	find = plist->_next->_next->_next;
	ListErase(find);
	ListPrint(plist);
	find = NULL;

	ListDestory(plist);
	plist = NULL;
}

int main()
{
	Test001();

	return 0;
}